package org.spark.java.transformation;

import org.apache.spark.SparkConf;
import org.apache.spark.api.java.JavaPairRDD;
import org.apache.spark.api.java.JavaSparkContext;
import scala.Tuple2;

import java.util.Arrays;
import java.util.List;

/**
 * 将两个RDD进行合并，不去重
 */
public class Union {

    public static void main(String[] args) {
        SparkConf sparkConf = new SparkConf();
        //设置运行环境
        sparkConf.setMaster("local");
        sparkConf.setAppName("union");
        JavaSparkContext context = new JavaSparkContext(sparkConf);
        List<Integer> list1=Arrays.asList(1,2,3,4,5);
        List<Integer> list2=Arrays.asList(4,5,6,7,8);

    }
}
